<!DOCTYPE html>
<!--
 Copyright (c) 2021 Gitpod GmbH. All rights reserved.
 Licensed under the GNU Affero General Public License (AGPL).
 See License.AGPL.txt in the project root for license information.
-->

<html>
<head>
    <meta charset='utf-8'>
    <title>Done</title>
    <script>
        if (window.opener) {
            const search = new URLSearchParams(window.location.search);
            const message = search.get("message");
            window.opener.postMessage(message, `https://${window.location.hostname}`);
        } else {
            console.log("This page is supposed to be opened by Gitpod.")
            setTimeout("window.close();", 1000);
        }
    </script>
</head>
<body>
    If this tab is not closed automatically, feel free to close it and proceed. <button className="px-4 py-2 my-auto bg-gray-900 hover:bg-gray-800 dark:bg-kumquat-base dark:hover:bg-kumquat-ripe text-gray-50 dark:text-gray-900 text-sm font-medium rounded-xl focus:outline-none focus:ring transition ease-in-out" type="button" onclick="window.open('', '_self', ''); window.close();">Close</button>
</body>
</html>
